package net.jueb.sniff4j.extr.base;
import java.util.HashMap;
import net.jueb.sniff4j.extr.auth.AddressCollection;
import net.jueb.sniff4j.extr.auth.Users;
import net.jueb.sniff4j.extr.user.DefaultUser;

/**
 * 运行时配置
 * @author Administrator
 *
 */
public class DefaultRunTime extends AbstractRuntime{
	

	/**
	 * 获取代理成功后的2个通道的初始化类
	 * 注意：此返回对象的init方法每次初始化的管道不能被重复，即初始化的对象不能在内部保留
	 * @param proxyClientChannel
	 * @param proxyTargeChannel
	 * @return
	 */
	@Override
	public AbstractChannelCodecInit getChannelCodecInit()
	{
		return new DefaultChannelCodecInit();
	}
	
	@Override
	protected void initAllowUsers(Users allowUsers) {
		allowUsers.addUser(new DefaultUser("default","default"));
		allowUsers.addUser(new DefaultUser("socks","socks"));
		allowUsers.addUser(new DefaultUser("test","test"));
	}
	@Override
	protected void initRefuseClients(AddressCollection refuseClients) {
		// TODO Auto-generated method stub
		
	}
	@Override
	protected void initRefuseProxyTargets(AddressCollection refuseProxyTargets) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void initBootConfig(BootConfig bootConfig) {
		
	}

	@Override
	protected void initServerContext(ServerContext serverConext) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void initUsersContexts(HashMap<String, UserContext> usersContexts) {
		// TODO Auto-generated method stub
	}
	
	
}
